<?php

use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;

?>
<div class="modal modal-sm">
    <a href="javascript:void(0);" class="modal-overlay"></a>
    <div class="modal-container">
        <div class="modal-header d-flex">
            <div class="modal-title h4 col-mr-auto">登陆</div>
            <a href="javascript:void(0);" class="btn btn-clear"></a>
        </div>
        <div class="modal-body">
            <div class="content">
                <div class="form-group">
                    <div class="text-right">
                        <span class="text-muted">还没有账号？<a href="javascript:void(0);" class="ajax-modal" data-href="<?= Url::to(['auth/register']); ?>">马上注册</a> </span>
                    </div>
                </div>
                <?php $form = ActiveForm::begin(['enableClientScript' => false]); ?>

                <?= $form->field($model, 'username')->textInput(['placeholder' => $model->getAttributeLabel('username'), 'class' => 'form-input'])->label(FALSE); ?>

                <?= $form->field($model, 'password')->passwordInput(['placeholder' => $model->getAttributeLabel('password'), 'class' => 'form-input', 'autocomplete' => 'off'])->label(FALSE); ?>

                <?= $form->field($model, 'rememberMe')->checkbox(); ?>

                <div class="form-group">
                    <?= Html::submitButton(Yii::t('app', 'Sign in'), ['class' => 'btn btn-block btn-danger btn-lg btn-auth']) ?>
                </div>

                <div class="form-group">
                    <div class="text-center"><a href="javascript:void(0);" class="ajax-modal" data-href="<?= Url::to(['auth/forgot-password']); ?>">忘记密码?</a></div>
                </div>
                <?php ActiveForm::end(); ?>
            </div>
        </div>
    </div>
</div>


